package com.xcx.baseManger.service;

import com.mongodb.client.result.DeleteResult;
import com.mongodb.client.result.UpdateResult;
import com.xcx.baseManger.helper.Message;
import com.xcx.baseManger.helper.User;
import com.xcx.commoncore.request.messagerequest.QueryMessageListRequest;
import com.xcx.commonuntils.returnuntls.ReturnMessage;

import java.util.List;

public interface MessageService {


    /**查询点对点聊天信息
     * @param fromId
     * @param toId
     * @param page
     * @param rows
     * @return
     */
    List<Message> findListFromAndTo(Integer fromId, Integer toId, Integer page, Integer rows);



    Message findMessageById(String id);
    User findByUsername(String username);

    UpdateResult updateMessageState(Object id,Integer status);

    void updateUser(User user);

    Message saveMessage(Message message);


    void  saveUser(User user);

    DeleteResult deleteMessage(String id);

    void deleteById (String username);


    ReturnMessage<Object> queryMessageList(QueryMessageListRequest registerVo);
}
